package org.example.framework.protocol.dubbo;

import org.example.framework.Invocation;
import org.example.framework.Invoker;
import org.example.framework.URL;

public class DubboInvoker implements Invoker {
    private URL url;

    public DubboInvoker(URL url) { this.url = url; }

    @Override
    public String invoke(Invocation invocation) {
        NettyClient nettyClient = new NettyClient();
        return nettyClient.send(url.getHostname(), url.getPort(), invocation);
    }
}
